using MediatR;
using Zhaoxi.Zhihu.Core.QuestionAggregate.Events;

namespace Zhaoxi.Zhihu.UseCases.Questions.Job;

public class QuestiorViewedEventHaldler(QuestionViewCountService questionViewCountService): INotificationHandler<QuestionViewedEvent>
{
    public Task Handle(QuestionViewedEvent notification, CancellationToken cancellationToken)
    {
        questionViewCountService.Add (notification. QuestionId);
        return Task.CompletedTask;
    }
}